package user.convert;


import blog.common.utils.SecurityUtil;
import user.api.pojo.UserInfoRegisterRequest;
import user.common.dataobject.UserInfo;



public class BeanConvert {
    public static UserInfo convertUserInfoEncrypt(UserInfoRegisterRequest userInfoRegister) {
        UserInfo userInfo = new UserInfo();
        userInfo.setUserName(userInfoRegister.getUserName());
        userInfo.setPassword(SecurityUtil.encrypt(userInfoRegister.getPassword()));
        userInfo.setEmail(userInfoRegister.getEmail());
        userInfo.setGithubUrl(userInfoRegister.getGithubUrl());
        return userInfo;
    }
}
